﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/html5.js"></script>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/respond.min.js"></script>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/PIE_IE678.js"></script>
<![endif]-->

<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/EXBase.js"></script>


<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title></title>
</head>
<body>
	<form class="form form-horizontal" method="post"
		action="admin/addOrModify" id="dataform"
		onsubmit="javascripr:return false;">
		<c:if test="${obj ne null }">
			<input type="hidden" name="id" value="${obj.id }">
		</c:if>
		<div class="row cl">
			<label class="form-label col-1">用户名称</label>
			<div class="formControls col-3">
				<input type="text" dataType="*1-100" class="input-text" name="name"
					value="${obj.name }" datatype="*1-16" nullmsg="用户名称不能为空">
			</div>
			<div class="col-2">
				<span class="Validform_checktip"></span>
			</div>
			<label class="form-label col-1">Email</label>
			<div class="formControls col-3">
				<input type="text" dataType="e" class="input-text"
				value="${obj.email }" name="email" nullmsg="Email不能为空">
			</div>
			<div class="col-2">
				<span class="Validform_checktip"></span>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-1">账号</label>
			<div class="formControls col-3">
				<input type="text" dataType="*1-510" class="input-text"
					value="${obj.account }" name="account" nullmsg="账号不能为空">
			</div>
			<div class="col-2">
				<span class="Validform_checktip"></span>
			</div>
			<label class="form-label col-1">联系电话</label>
			<div class="formControls col-3">
				<input type="text" dataType="m" class="input-text" name="tel"
					value="${obj.tel }" datatype="*1-16" nullmsg="联系电话不能为空">
			</div>
			<div class="col-2">
				<span class="Validform_checktip"></span>
			</div>
		</div>
		<c:if test="${obj eq null }">
		<div class="row cl">
			<label class="form-label  col-sm-1">密码：</label>
			<div class="formControls  col-sm-3">
				<input type="password" name="password" id="password" value="123"
					class="input-text radius" dataType="*1-50">
			</div>
			<div class="col-2">
				<span class="Validform_checktip"></span>
			</div>

			<label class="form-label  col-sm-1">确认密码：</label>
			<div class="formControls  col-sm-3">
				<input type="password" class="input-text radius" datatype="*" value="123"
					recheck="password" nullmsg="请再输入一次密码！" errormsg="您两次输入的账号密码不一致">
			</div>
			<div class="col-2">
				<span class="Validform_checktip"></span>
			</div>
		</div>
		</c:if>
		<div class="row cl">
			<label class="form-label col-1">角色</label>
			<div class="formControls col-3">
				<select class="select select-box" size="1" name="roleId">
				<c:forEach items="${list }" var="item">
						<option
							<c:if test="${obj ne null && obj.roleId eq item.id }"> selected="selected" </c:if>
							value='${item.id }'>${item.name }</option>
				</c:forEach>
				</select>
			</div>
			<div class="col-2">
				<span class="Validform_checktip"></span>
			</div>
		</div>
		<div class="row cl">
			<div class="col-9 col-offset-3">
				<button type="button" onclick="EXForm.submit()"
					class="btn btn-success radius" id="save-btn">保存</button>
			</div>
		</div>
	</form>
	<script type="text/javascript">
		EXForm.initForm();
	</script>
</body>
</html>